-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Icesugar support #49
base: master
Are you sure you want to change the base?
Conversation
Hi. I stumbled across this comment in https://github.com/wuxx/icesugar/blob/master/src/basic/verilog/flash/top.v
Invert the relevant pin definitions in BOARDS/icesugar.pcf to:
...and it seems to work fine - firmware can be flashed at 0x20000 and Femtosoc will execute the program from flash. PS: I'm compiling firmware on WSL2 and then executing icesprog in windows to do the uploading as WSL doesn't support USB devices on Windows host. To flash the firmware (eg hello.c) I use
...because icesprog doesn't seem to support text offsets as used in the FIRMWARE/makefile.inc (iceprog -o 128k ....) |
Somehow i completely missed your comment - thanks, i'll give it a shot later today, or tomorrow. |
Indeed, after inverting spi MISO/MOSI, i successfully flashed hello world and see it execute from flash. |
Signed-off-by: Paolo Pisati <[email protected]>
Signed-off-by: Paolo Pisati <[email protected]>
Signed-off-by: Paolo Pisati <[email protected]>
…disable old and lex matrix pmods Signed-off-by: Paolo Pisati <[email protected]>
Signed-off-by: Paolo Pisati <[email protected]>
Signed-off-by: Paolo Pisati <[email protected]>
… use the same chip family)
Signed-off-by: Paolo Pisati <[email protected]>
…mory mapped @ 0x800000 Signed-off-by: Paolo Pisati <[email protected]>
Signed-off-by: Paolo Pisati <[email protected]>
Signed-off-by: Paolo Pisati <[email protected]>
The Icesugar board is a close relative (clone?) of the Icebreaker board: iCE40UP5K, 12Mhz clock, 3 PMODS (well, technically four if you solder one header), 8MB SPI flash, etc and while it was already mentioned in FemtoRV, the target didn't build.
This pull request is a WIP (aka builds but don't run) and reviews/comments/ pointers are welcome: i went with the FEMTORV32_QUARK (since GRACILIS didn't fit, werird since sugar and breaker share the same exact fpga chip - BTW, is FEMTO good enough to run code from flash?) and had to execute code from SPI flash (since firmware.hex was ~45KB and blew past the available 12KB BRAM), on top of that SPI flash is only 8MB (vs 16MB in Icebreaker - see also NRV_RESET_ADDR) and i still have to figure out FemtoRV/FIRMWARE/CRT/spiflash*.ld blackmagic.
I already checked the pcf against the schematics (so that part should be correct), while i'm a bit worried about code execution from flash/linker script errors and wouldn't be surprised if i overlooked something there.
Let me know.